<template>
  <div class="centerRight2">
    <div class="bg-color-black">
      <div class="d-flex pt-2 pl-2">
        <span>
          <i class="iconfont icon-vector" />
        </span>
        <div class="d-flex">
          <span class="fs-xl text mx-2">今日停车场泊位统计</span>
        </div>
      </div>
      <div class="d-flex mt-1 jc-center body-box">
        <dv-scroll-board class="dv-scr-board" :config="config" />
      </div>
    </div>
  </div>
</template>

<script>
// import {parkSum} from "@/api/api";
import axios from "axios";
export default ({
  components: {
    //Chart
  },
  mounted() {
    axios.get(this.$route.params.url+'dataView/parkingLotBerth/statistics').then(res=>{
          for (let i = 0; i < res.data.length; i++) {
            let m = [];
            for(let j in res.data[i]){
              m.push(res.data[i][j]);
            }
            this.config.data.push(m);
            //console.log(this.config.data)
          }
          this.config = { ...this.config }
        });
  },
  methods: {},
  data() {
    return {
      config: {
        header: ['路段', '泊位总数', '占用', '空闲'],
        data:[],
        rowNum: 6, //表格行数
        headerHeight: 35,
        headerBGC: '#0f1325', //表头
        oddRowBGC: '#0f1325', //奇数行
        evenRowBGC: '#171c33', //偶数行
        index: true,
        columnWidth: [80],
        align: ['center'],
      },
    }
  },

})
</script>

<style lang="scss" scoped>
$box-height: 410px;
$box-width: 600px;
.centerRight2 {
  padding: 16px;
  padding-top: 20px;
  height: $box-height;
  width: $box-width;
  border-radius: 5px;
  .bg-color-black {
    height: $box-height - 30px;
    border-radius: 10px;
  }
  .text {
    color: #c3cbde;
  }
  .body-box {
    border-radius: 10px;
    overflow: hidden;
    .dv-scr-board {
      align-items: center;
      width: 540px;
      height: 340px;
    }
  }
}
</style>
